//
//  OMPersonalCenterCheapViewController.m
//  OMENGO
//
//  Created by 梁尚嘉 on 2016/12/20.
//  Copyright © 2016年 Kamfat. All rights reserved.
//

#import "OMPersonalCenterCheapViewController.h"
#import "OMPersonalCenterCheapListViewController.h"
#import "OMCouponRuleView.h"
@interface OMPersonalCenterCheapViewController ()

@end

@implementation OMPersonalCenterCheapViewController

- (void)viewDidLoad {
    
    // Do any additional setup after loading the view.
    OMPersonalCenterCheapListViewController *vc1 = [[OMPersonalCenterCheapListViewController alloc] init];
    vc1.title = @"未使用";
    vc1.isUsed = NO;

    OMPersonalCenterCheapListViewController *vc2 = [OMPersonalCenterCheapListViewController new];
    vc2.title = @"已使用";
    vc2.isUsed = YES;


    NSArray *viewCtrls = @[vc1,vc2];

    self.controllers = viewCtrls;

    [super viewDidLoad];

    NSString *itemTitle = @"规则说明";
    self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithTitle:itemTitle style:UIBarButtonItemStylePlain target:nil action:nil];
    self.navigationItem.rightBarButtonItem.rac_command = [[RACCommand alloc]initWithSignalBlock:^RACSignal *(id input) {
        [[OMCouponRuleView new] showInView:SMKeyWindow];
        return [RACSignal empty];
    }];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
